package library_management.user;

import library_management.operation.IOperation;
import library_management.operation.impl.BorrowedOperation;
import library_management.operation.impl.DisplayOperation;
import library_management.operation.impl.FindOperation;
import library_management.operation.impl.ReturnOperation;

public class NormalUser extends User{
    public NormalUser(String normalName) {
        this.name=normalName;
        operations=new IOperation[]{
                new DisplayOperation(),
                new FindOperation(),
                new BorrowedOperation(),
                new ReturnOperation()
        };
    }

    @Override
    public int menu() {
        System.out.println("================================");
        System.out.println("欢迎"+this.name+"进入图书管理系统");
        System.out.println("1、展示现有书籍");
        System.out.println("2、查找书籍");
        System.out.println("3、借阅书籍");
        System.out.println("4、归还书籍");
        System.out.println("-1、退出登录");
        System.out.println("请输入您的选择：");
        int choice=scanner.nextInt();
        return choice;
    }
}
